import {userInterface} from "@/components/Loign/interface/interface.ts";

const key: string = 'userInfo'

export const setUserInfo = (userInfo: userInterface): void => {
    localStorage.setItem(key, JSON.stringify(userInfo))
}

export const getUserInfo = (): userInterface => {
    return JSON.parse(localStorage.getItem(key)) || {}
}

export const removeUserInfo = (): void => {
    localStorage.removeItem(key)
}
